replaceAll

fun replaceAll(str: String, toReplace: String, replaceWith: String?): String

Replace one or more tokens inside another string with a value.

Return

The str string with the token replaced with a new value.

Parameters

str

The string containing the token(s).

toReplace

The token, case sensitive, to be replaced.

replaceWith

The string to replace the token with. Can be null.